<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/jsplib/pubhead.jsp"%>
<%@ page import="net.comm.common.ValueMaping" %>
<%@ taglib uri="/WEB-INF/myTaglib.tld" prefix="tag"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>用户搜索</title>
	<link href="${cpath}/css/youlin.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body>
<!--外套 start -->
<div class="wrap">
  <!--页首 start -->
	<%@ include file="/menu.jsp"%>
  <!--页首 end -->  
  
  <!--导航面包屑 start -->
  <div class="breadCrumb">
  <div class="breadCrumbNav">当前位置：<a href="${cpath}/users.do?action=main">我的主页</a> >> <a >用户搜索</a> </div>
  <div class="breadCrumbSearch">
	<form action="${cpath}/shequ.do?action=adlist" name="searchForm"  method="post" >
    搜索<input type="radio" name="findtype" class="pr" name="mod" value="shequ"  onclick="javascript:chg();"/> 社区
	<input type="radio" name="findtype" value="user" class="pr"  checked="checked"/> 用户
    <input type="text" name='findstr' value='${theForm.qryNick}' maxlength="100" class="in"/>
    <a href="javascript:dosearch();"><img src="${cpath}/images/icon_12.gif" width="66" height="20" class="btn" /></a>
	<input type="hidden" name='village' value=''/>
	<input type="hidden" name='qryNick' value=''/>
   </form>
  </div> 
 </div> 
  <!--导航面包屑 end -->
  
  <!--主体 start -->
 <div class="body myalbum">
 
 <div class="left-Box6">
  <h3>用户搜索列表</h3>
  <div class="left-Box6-content">
  	<form action="${cpath}/userhome.do" name="theForm"  method="post" enctype="multipart/form-data" >
          <dl class="mylogList">
             <dt>
               <!--<span class="s1">用户ID</span>-->
               <span class="s2">用户ID</span>
               <span class="s1">用户名称</span>
               <span class="s4">所在城市</span>
               <span class="s5">所在地区</span>
               <span class="s6">所在小区</span>
               <span class="s7">楼号</span>
               <span class="s8">入住时间</span>
             </dt>
			 <c:forEach var="userhome" items="${userhomelist}" varStatus="status"> 
             <dd>
               <!--<span class="s1"></span>-->
               <span class="s2">${userhome.userID}</span>
               <span class="s1"><a href="${cpath}/users_home/userID_${userhome.userID}.html"><img src="${cpath}/${myfn:getUserPic(userhome.userID)}" width="20" height="20">&nbsp;${myfn:getUserNick(userhome.userID)}</a></span>
               <span class="s4">${myfn:getCnpcaName(userhome.work_sublocation)}</span>
               <span class="s5">${myfn:getCnpcaName(userhome.work_area)}</span>
               <span class="s6"><a href="${cpath}/shequ_home/villageID_${userhome.villageID}.html">${myfn:getVillageName(userhome.villageID)}</a></span>
               <span class="s7">${userhome.building}栋</span>
               <span class="s8 color_grey1">${userhome.inTime}</span>
             </dd>
			</c:forEach>
          </dl>           
    <div class="clearFloat"></div>
    
    <div class="page">
		<input type="hidden" name='qryNick'		value='${theForm.qryNick}'/>
		<!-- 分页主键 formName字段当前的form名称 -->
		<%@ include file="/jsplib/page.jsp" %>
		<!--隐藏域-->
		<input type="hidden" name='action' value='selist'/>
    </div>
	</form>

  </div>
 </div>  
    
 <div class="clearFloat"></div>
 </div> 
 <!--主体 end -->
 
 <!--页脚 start -->
	<%@ include file="/foot.jsp"%>
 <!--页脚 end --> 
</div>
<!--外套 end -->

</body>
</html>
<script>
    /**
     * 检查项目资料维护
     */
	function doConfirm()
	{
		var form = document.theForm;

		var action = form['action'];

		form.submit();
	}
</script>
<script>
	function dosearch()
	{
		var form = document.searchForm;
		var findstr = form['findstr'];
		if(findstr.value == "" || findstr.value.replace(/(^\s*)|(\s*$)/g,"").length < 1){
			alert("请输入搜索内容！");
			form['findstr'].focus();
			return ;
		}
		var resualt=false;
		for(var i=0;i<document.searchForm.findtype.length;i++)
		{			
			if(document.searchForm.findtype[i].checked)
			{
			  resualt=document.searchForm.findtype[i].value;
			}
		}
		var village = form['village'];
		var qryNick = form['qryNick'];
		if(resualt == "shequ"){

			village.value = findstr.value;
			document.searchForm.action = "/shequ.do?action=adlist";
		}else{

			qryNick.value = findstr.value;
			document.searchForm.action = "/userhome.do?action=selist";
		}
		form.submit();
	}
</script>